/*
 * trace_CmdLoopExit.h
 *
 *  Created on: 2012/08/07
 *      Author: guanxiaoying
 */

#ifndef TRACE_CMDLOOPEXIT_H_
#define TRACE_CMDLOOPEXIT_H_
/*
 *  The exit path information of a loop.
 *  Act as a stack.
 *
 *  CASE 1:
 *  Before into a loop, record the number of this table to LOOP-STACK(stTrLoopStkAccess).
 *  CASE 2:
 *  Tracing in a loop, and a branch-path which does not
 *    belong to the current loop is pushed into this table.
 *  CASE 3:
 *  Leave the current loop.
 *    Do things below for the records which were created in the current loop.
 *    Push the records which were created in the current loop
 *    to PATH-STACK(stTrPathStkAccess), and delete them.
 *  CASE 4:
 *  Before into a function, record the number of this table to Function-STACK(stFuncStkAccess).
 *  CASE 5:
 *  Leave the current function.
 *    Delete the records which were created in the current function.( Should be nothing )
 */
typedef struct {
	BOOL (*clear)( VOID );
	BOOL (*alloc)( AST );
	AST  (*getMax)( VOID );
	/* property below: the exit-path of loop */
	ACCESS_IDX_FIELD path;
	/* property below: the next path of property-path */
	ACCESS_IDX_FIELD next;
	/* property below: the parameter before tracing property-path */
	ACCESS_IDX_FIELD pathParam;
	/* property below: whose exit */
	ACCESS_IDX_FIELD loop;
}CMDLOOPEXITACCESS;
extern const CMDLOOPEXITACCESS stCmdLoopExitAccess;

#endif /* TRACE_CMDLOOPEXIT_H_ */
